<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/tire/tire.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/tire/tire.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'TireId',
                footer: "Foots",
                cnName: '轮胎使用记录',
                name: 'tire/tire',
                url: "/VehicleService/api/tire/",
                sortName: "CreateTime"
            });
            const editFormFields = ref({"TireBrand":"","TireSpecs":"","TireNum":"","UsePerson":"","UseDate":"","TireRemark":""});
            const editFormOptions = ref([[{"title":"轮胎品牌","field":"TireBrand"}],
                              [{"title":"规格","field":"TireSpecs"}],
                              [{"title":"数量","field":"TireNum","type":"number"}],
                              [{"title":"使用人","field":"UsePerson"}],
                              [{"title":"使用日期","field":"UseDate","type":"datetime"}],
                              [{"title":"备注","field":"TireRemark"}]]);
            const searchFormFields = ref({"TireBrand":"","TireSpecs":"","UsePerson":"","UseDate":""});
            const searchFormOptions = ref([[{"title":"轮胎品牌","field":"TireBrand","type":"text"},{"title":"规格","field":"TireSpecs","type":"text"},{"title":"使用人","field":"UsePerson","type":"text"},{"title":"使用日期","field":"UseDate","type":"datetime"}]]);
            const columns = ref([{field:'TireId',title:'轮胎使用记录Id',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'TireBrand',title:'轮胎品牌',type:'string',width:110,align:'left',sort:true},
                       {field:'TireSpecs',title:'规格',type:'string',width:110,align:'left'},
                       {field:'TireNum',title:'数量',type:'int',width:110,align:'left'},
                       {field:'UsePerson',title:'使用人',type:'string',width:110,align:'left'},
                       {field:'UseDate',title:'使用日期',type:'date',width:150,align:'left',sort:true},
                       {field:'TireRemark',title:'备注',type:'string',width:110,align:'left'},
                       {field:'IsDelete',title:'逻辑删除',type:'int',width:110,hidden:true,align:'left'},
                       {field:'CreateName',title:'创建人',type:'string',width:110,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'UpdateName',title:'修改人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'UpdateTime',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
